/** @format */

$color-primary: #409eff;
$color-success: #67c23a;
$color-warning: #e6a23c;
$color-danger: #e03770;
$color-info: #909192;

$colorNames: (
    'primary': $color-primary,
    'success': $color-success,
    'warning': $color-warning,
    'danger': $color-danger,
    'info': $color-info,
);

@mixin createColor() {
    @each $name, $color in $colorNames {
        @for $i from 1 through 5 {
            @if ($i == 1) {
                #{--color}-#{$name}: $color;
            } @else {
                #{--color}-#{$name}-light-#{$i}: scale-color(
                    $color,
                    $lightness: $i * 19%
                );
            }
        }
        @for $i from 1 through 5 {
            #{--color}-#{$name}-dark-#{$i}: scale-color(
                $color,
                $lightness: $i * -10%
            );
        }
    }
}
